<?php !defined('INC') && exit('Load failure!'); ?>
<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>{$title}{?= PID==1?'':'_第'.PID.'页' ?}_{$site.name}</title>
	<meta name="keywords" content="{$keywords code='quote'}" />
	<meta name="description" content="{$description code='quote'}" />
	<link rel="stylesheet" href="{DIR.T}css/style.css">
	<link rel="stylesheet" href="{DIR.T}css/base.css">
	<link rel="stylesheet" href="{DIR}user/css/system.css">
	<script charset="UTF-8" src="{DIR}user/js/jquery.js"></script>
	<script charset="UTF-8" src="{DIR}user/js/system.js"></script>
	<script charset="UTF-8" src="{DIR.T}js/easySlider.packed.js"></script>
	<script>
		$(document).ready(function(){	
			$("#slider").easySlider({
				controlsBefore:	'<p id="controls">',
				controlsAfter:	'</p>',
				auto: true, 
				continuous: true,
				prevId: 'prevBtn',
				nextId: 'nextBtn'	
			});
		});
	</script>
	<link href="{DIR}favicon.ico" type="image/x-icon" rel="shortcut icon"/>
	<link href="{DIR}favicon.ico" type="image/x-icon" rel="bookmark icon"/>
	{$system.head code='html'}
	<!--[if lt IE 9]>
	<script charset="UTF-8" src="{DIR}user/js/html5.js"></script>
	<![endif]-->
</head>
<body>

<div class="header">
	{@rs.one table='%s_template_logo' field='logopath' where="code='logo' and path='blueness'"}
	{#if(!empty($rs))}
	<a class="logo" href="{DIR}" title="{$site.name}"><img src="{DIR}{$rs['logopath']}" alt="{$site.name}"/></a>
	{#else}
	<a class="logo" href="{DIR}" title="{$site.name}"><img src="{DIR.T}images/logo.gif" alt="{$site.name}"/></a>
	{#endif}
	<div class="topnav">
		{#if($u->info['islogin'])}
		<a href="{DIR}?user-info" title="{$u->name}">{$u->name}</a>|
		<a href="javascript:;" onclick="$.kc_ajax({URL:'{DIR}user/manage.php',CMD:'logout'})" title="退出登录">退出</a>
		{#else}
		<a href="javascript:;" onclick="$.kc_ajax({URL:'{DIR}user/manage.php',CMD:'login',FORM:'login'});return false;" title="登陆">登陆</a>|
		<a href="javascript:;" onclick="$.kc_ajax({URL:'{DIR}user/manage.php',CMD:'register',FORM:'login'});return false;" title="注册">注册</a>		
		{#endif}
		{@res table='%s_link' field='name,url,ifshow,opennew' where='cid=3' order='norder desc,id asc' number='3'}
		{#foreach($res as $rs)}
		|<a{#if($rs['ifshow']==0)} style="display:none;"{#endif} href="{$rs[url]}" title="{$rs[name] code='quote'}"{#if($rs['opennew']==1)} target="_blank"{#endif}>{$rs[name]}</a>
		{#endforeach}<!--导航-->
		<strong>电话：<h3>{$system.tel}</h3></strong>
	</div>
</div>

<div class="topmenu">
	<ul>
		{@res table='%s_link' field='name,url,ifshow,opennew' where='cid=1' order='norder desc,id asc' number='7'}
		{#foreach($res as $rs)}
		<li{#if($rs['ifshow']==0)} style="display:none;"{#endif}><a href="{$rs[url]}"{?=$_SERVER['REQUEST_URI']==$rs['url']?' class="on" ' :''?} title="{$rs[name] code='quote'}"{#if($rs['opennew']==1)} target="_blank"{#endif}>{$rs[name]}</a></li>
		{#endforeach}<!--导航-->
	</ul>
	<form action="/" method="get" class="search">
		<input class="search_input" type="text" maxlength="50" name="q" size="5" value="<?=empty($_GET['q'])?'':htmlspecialchars($_GET['q'])?>"/>
		<input class="search_btn" type="submit" value="搜索">
		<input type="hidden" value="content" name="app">
	</form>
</div>


<div id="content">
	<div id="slider">
		<ul>
			{@rs.one table='%s_template_logo' field='logopath,logourl,title' where="code='banner1' and path='blueness'"}
			{#if(!empty($rs))}
			<li><a href="{$rs[logourl]}" title="{$rs[title]}"><img src="{DIR}{$rs[logopath]}" alt="{$rs[title]}"/></a></h1>
			{#else}
			<li><a href="{DIR}"><img src="{DIR.T}images/banner/banner1.jpg" alt="ad" /></a></li>
			{#endif}
			{@rs.one table='%s_template_logo' field='logopath,logourl,title' where="code='banner2' and path='blueness'"}
			{#if(!empty($rs))}
			<li><a href="{$rs[logourl]}" title="{$rs[title]}"><img src="{DIR}{$rs[logopath]}" alt="{$rs[title]}"/></a></h1>
			{#else}
			<li><a href="{DIR}"><img src="{DIR.T}images/banner/banner2.jpg" alt="ad" /></a></li>
			{#endif}
			{@rs.one table='%s_template_logo' field='logopath,logourl,title' where="code='banner3' and path='blueness'"}
			{#if(!empty($rs))}
			<li><a href="{$rs[logourl]}" title="{$rs[title]}"><img src="{DIR}{$rs[logopath]}" alt="{$rs[title]}"/></a></h1>
			{#else}
			<li><a href="{DIR}"><img src="{DIR.T}images/banner/banner1.jpg" alt="ad" /></a></li>
			{#endif}
		</ul>
	</div>
</div>
